<?php

include '../connectBDD.php';
$id = $_GET['id'];
$type = $_GET['type'];
if (isset($_GET['id']) && isset($_GET['type'])) {
    if ($type == "envoye") {
        $query = "DELETE FROM Message_sent WHERE id_msg = $id";
    } else if ($type == "recu") {
        $query = "DELETE FROM Message WHERE id_msg = $id";
    }
    mysql_query($query) or die(mysql_error());
}
?>
